/*******************************************************************************
 * Copyright (c) 2010, 2015 git@git.oschina.net:kaiwill/springstage.git
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.qinyeit.serviceapp.entity.enums;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * ClassName: MaterialType <br/>
 * Function: 原料类型 <br/>
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum Industries {

    ZC("餐饮"),
    HB("烘焙"),
//    KC("快餐"),
    SX("生鲜"),
    LS("零售");


    private final String text;

    private Industries(String text) {
        this.text = text;
    }
    public String getText() {
        return text;
    }
    public String getKey() {
        return toString();
    }

    public static String getKeyByText(String name){
        switch (name){
            case "中餐":
                return ZC.getKey();
            case "烘焙":
                return HB.getKey();
           /* case "快餐":
                return KC.getKey();*/
            case "生鲜":
                return SX.getKey();
            case "零售":
                return LS.getKey();
            default:
                return ZC.getKey();
        }
    }

}
